package com.itheima.reggie.common;

import com.itheima.reggie.domain.Employee;

//ThreadLocal操作工具类
public class EmployeeHolder {
  //声明
    private static ThreadLocal<Employee> threadLocal= new ThreadLocal<Employee>();
    //存储
    public static void ser(Employee employee){
        threadLocal.set(employee);
    }
    //获取
    public static Employee get(){
        return threadLocal.get();
    }
    //删除
    public static void remove(){
        threadLocal.remove();
    }
}
